import request from "@/utils/request";

export function login(data) {
  return request({
    url: "/dev-api/vue-admin-template/user/login",
    method: "post",
    data,
  });
}

export function getInfo(token) {
  return request({
    url: "/dev-api/vue-admin-template/user/info",
    method: "get",
    params: { token },
  });
}

export function logout() {
  return request({
    url: "/dev-api/vue-admin-template/user/logout",
    method: "post",
  });
}
//============================================================================
export function getAssignRoles(data) {
  return request({
    url: "/platform/employee/assignRoles",
    method: "post",
    data,
  });
}
export function getUserList(params) {
  return request({
    url: "/platform/employee/list",
    method: "get",
    params,
  });
}

export function loginNew(data) {
  return request({
    url: "/platform/employee/login",
    method: "post",
    data: data,
  });
}
// 获取权限信息
export function getInfoNew(params) {
  return request({
    url: "/platform/employee/assignRolesOptions",
    method: "get",
    params,
  });
}

export function registerNew(data) {
  return request({
    url: "/platform/employee/register",
    method: "post",
    data,
  });
}
